Skip to content

AggLayer: Normalize storage slot naming#2521

Open
Fumuran wants to merge 1 commit intoagglayerfrom
andrew-normalize-storage-slot-naming
Open

AggLayer: Normalize storage slot naming#2521
Fumuran wants to merge 1 commit intoagglayerfrom
andrew-normalize-storage-slot-naming

Conversation

@Fumuran
Copy link
Contributor

@Fumuran Fumuran commented Feb 26, 2026

This tiny PR updates some of the storage slot names, namely:

  • miden::agglayer::let and miden::agglayer::let::* were renamed to have additional bridge after agglayer: miden::agglayer::bridge::let to make all bridge related storage slot consistently have bridge in their names.
  • miden::agglayer::faucet and miden::agglayer::faucet::conversion_info_{1, 2} storage slots were renamed to miden::agglayer::bridge::id and miden::agglayer::bridge::conversion_info_{1, 2}. While being the storage slots of the faucet, these slots store the bridge data, so the new name should represent the contents more clearly.

Closes: #2356

@Fumuran Fumuran added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Feb 26, 2026
@mmagician mmagician added agglayer PRs or issues related to AggLayer bridging integration pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority labels Mar 1, 2026
@Fumuran Fumuran marked this pull request as ready for review March 2, 2026 14:50
Copy link
Collaborator

@mmagician mmagician left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on! Unfortunately I think this is one of those bike-sheddeable PRs, so let me go right at it 😁


There are some slots in bridge_config.masm, of which I think one deserves a rename (of the last component - I'd drop miden prefix from all of them as outlined in the other comments above):

const GER_STORAGE_SLOT=word("miden::agglayer::bridge::ger")

I'd change the name to indicate it's a map.

Regarding admin / ger_manager - we might want to be consistent w.r.t. this holding an account ID, similarly to bridge_id.
So maybe admin_id etc.? Alternatively, suffix all of them with _account_id instead for extra clarity.

# Storage slots
# The slot in this component's storage layout where the bridge account ID is stored.
const BRIDGE_ID_SLOT = word("miden::agglayer::faucet")
const BRIDGE_ID_SLOT = word("miden::agglayer::bridge::id")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per the docs, we should follow:

project_name::component_name::slot_name

Here, I would make two modifications:

  • drop miden altogether (from all agglayer storage slots)
  • use bridge or faucet depending on which component this belongs to (e.g. particular one belongs to the faucet, but describes the bridge account ID. So overall I'd keep it as agglayer::faucet::bridge_id)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agglayer PRs or issues related to AggLayer bridging integration no changelog This PR does not require an entry in the `CHANGELOG.md` file pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants